export const indexData = {
  newsColumns: [
    { width: 200, label: '新闻标题', prop: 'title', showTooltip: true },
    // { width: 120, label: '新闻图片', prop: 'cover', slot: true },
    { width: 160, label: '分类', prop: 'cate_name' },
    { width: 120, label: '作者', prop: 'author' },
    { label: '简介', prop: 'intro', showTooltip: true },
    { width: 120, label: '上线/下线', prop: 'status', slot: true },
    { width: 220, label: '时间', prop: 'time', slot: true },
  ],
  formList: [
    { label: '新闻标题', placeholder: '新闻名称', value: 'title', type: 'input' },
    { label: '到期时间', placeholder: '到期时间', value: 'end_time', type: 'date' },
    { label: '分类', placeholder: '请选择分类', value: 'cateId', type: 'select', options: [] },
  ],
  formValue: {
    title: '',
    end_time: '',
    cateId: ''
  }
}

export const sortData = {
  columns: [
    { label: '分类名称', prop: 'name' },
    { label: '分类描述', prop: 'describe' },
  ]
}

export const newsAddRules = {
  title: [
    { required: true, message: '请输入新闻标题', trigger: 'blur' },
  ],
  cover: [
    { required: true, message: '请上传新闻图片', trigger: 'blur' },
  ],
  start_time: [
    { required: true, message: '请选择开始/到期时间', trigger: 'change' },
  ],
  sort: [
    { required: true, message: '请输入1-50正整数新闻排序', trigger: 'change' },
  ],
  cate_id: [
    { required: true, message: '请选择新闻分类', trigger: 'change' },
  ],
  publish_time: [
    { required: true, message: '请选择发布时间', trigger: 'change' },
  ],
  author: [
    { required: true, message: '请输入新闻作者', trigger: 'blur' },
  ],
  intro: [
    { required: true, message: '请输入新闻简介', trigger: 'blur' },
  ],
  info: [
    { required: true, message: '请输入新闻内容', trigger: 'blur' },
  ]
}

//  广告列表
export const bannerData = {
  columns: [
    { width: 100, label: '排序', prop: 'sort' },
    { width: 100, label: '编号', prop: 'id' },
    { width: 200, label: '广告标题', prop: 'name', showTooltip: true },
    { width: 120, label: '作者', prop: 'author' },
    { label: '简介', prop: 'intro', showTooltip: true },
    { width: 120, label: '上线/下线', prop: 'status', slot: true },
    { width: 220, label: '时间', prop: 'time', slot: true },
  ],
  formList: [
    { label: '到期时间', placeholder: '到期时间', value: 'end_time', type: 'date' },
    { label: '广告标题', placeholder: '广告标题', value: 'title', type: 'input' },
  ],
  formValue: {
    title: '',
    end_time: '',
  },
  newsColumns: [
    { label: '新闻标题', prop: 'title', showTooltip: true },
    { width: 120, label: '作者', prop: 'author' },
    { label: '时间', prop: 'time', slot: true },
  ],
}
export const bannerAddRules = {
  name: [
    { required: true, message: '请输入广告标题', trigger: 'blur' },
  ],
  cover: [
    { required: true, message: '请上传广告图片', trigger: 'blur' },
  ],
  sort: [
    { required: true, message: '请输入1-50正整数广告排序', trigger: 'change' },
  ],
  start_time: [
    { required: true, message: '请选择开始/到期时间', trigger: 'change' },
  ],
  author: [
    { required: true, message: '请输入广告作者', trigger: 'blur' },
  ],
  intro: [
    { required: true, message: '请输入广告简介', trigger: 'blur' },
  ],
  info: [
    { required: true, message: '请输入广告内容', trigger: 'blur' },
  ],
  remark: [
    { required: true, message: '请输入广告备注', trigger: 'blur' },
  ],
  publish_time: [
    { required: true, message: '请选择发布时间', trigger: 'change' },
  ],
}